<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <title>Home</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link th:href="@{/css/icon/bootstrap-icon.css}" rel="stylesheet">

    <link th:href="@{/css/bootstrap.css}" rel="stylesheet">
<!--    <link rel="stylesheet" href="/css/style-min.css">-->
    <link rel="stylesheet" href="/css/index.css">
    <style>
    </style>
</head>

<body>
<!--头部：快速导航栏+logo+搜索+购物车-->
    <div class="header-area" th:fragment="header">
<!--        顶部导航栏-->
        <div class="header-top full-border">
            <div class="container">
                <div class="row">
<!--                    顶部左侧文字-->
                    <div class="col-lg-6 col-12 top-nav" style="background-color: rgba(239,239,239,0.2);">
                        <span class="header-top-left" th:if="${userFlag != 0}" th:text="'欢迎回来~~ '+${session.user.getUserName()}"></span>
                        <a href="javascript:;" class="top-left" style="display: inline-block;margin-left: 100px">
                            首页
                        </a>
                        <a href="javascript:;" class="top-left" style="display: inline-block;margin-left: 20px">
                            企业团购
                        </a>
                        <a href="javascript:;" class="top-left" style="display: inline-block;margin-left: 20px">
                            保障服务
                        </a>
                        <a href="javascript:;" class="top-left" style="display: inline-block;margin-left: 20px">
                            以旧换新
                        </a>
                        <a href="javascript:;" class="top-left" style="display: inline-block;margin-left: 20px">
                            下载APP
                        </a>
                    </div>
<!--                    右侧快速导航栏-->
                    <div class="col-lg-6 col-12">
                        <div class="box-right">
                            <ul>
                                <li class="settings">
                                    <a href="register">
                                        <span>注册</span>
                                        <i class="bi bi-person-hearts"></i>
                                    </a>
                                </li>
                                <li class="settings" th:if="${userFlag != 0}">
                                    <a href="/userIndex" class="drop-toggle">
                                        <span>个人中心</span>
                                        <i class="bi bi-person-hearts"></i>
                                    </a>
                                </li>
                                <li class="settings" th:if="${userFlag == 0}">
                                    <a href="/login" class="drop-toggle">
                                        <span style="color: rgb(206,90,90)">未登陆</span>
                                        <i class="bi bi-person-hearts"></i>
                                    </a>
                                </li>
                                <li class="settings" th:if="${userFlag != 0}">
                                    <a href="/userLoginOut" class="drop-toggle">
                                        <span>退出</span>
                                        <i class="bi bi-person-hearts"></i>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>

<!--        logo+search+cart -->
        <div class="header-middle space-40">
            <div class="container">
                <div class="row align-items-center">
<!--                    logo-->
                    <div class="col-lg-3 col-6">
                        <div class="logo">
                            <a href="/"><img src="/img/fighting.svg"></a>
                        </div>
                    </div>
                    <div class="col-lg-9 col-6">
<!--                                解决-->
                        <div class="header-middle-inner">
                            <div class="search-container">
                                <form action="#">
                                    <div class="search_box">
                                        <input class="header-search" placeholder="Enter your search key ..." type="text" style="margin-left: 5%">
                                        <button class="header-search-button" type="submit">Search</button>
                                    </div>
                                </form>
                            </div>
                            <div class="shopping-cart">
                                <a href="/userIndex/shoppingCart" class="drop-toggle" th:if="${userFlag != 0}">
                                    <i class="bi bi-cart-dash"></i>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</body>

</html>